package com.iplant.pdm.service.po.bop;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.po.DBBasePO;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.join.DBJoin;
import com.iplant.basic.service.po.bpm.BPMTaskBase;

/**
 * 工艺路线版本审批
 *
 * @author YouWang·Peng
 * 2023-9-27 14:27:43
 */
@DBBasePO(TableName = "FPC_Route_BPM", CheckName = {"Code"}, Name = false, Active = false,
        Schemas =
                DBSchemas.PDM, CodeAuto = true, CodePrefix = "FRBPM-{yyyyMMdd}-", CodeNum = 4)
public class FPCRouteBPM extends BPMTaskBase {

    /**
     * 工艺路线ID
     */
    @DBCondition
    @DBField
    public int RouteID = 0;
    /**
     * 工艺路线版本
     */
    @DBCondition(CompareType = DBCondition.DBCompareType.like)
    @DBJoin(name = "Version", tableName = "fpc_route", tableAsName = "fpc_route1", Schemas = DBSchemas.PDM,
            MainTableField = "RouteID")
    public String RouteVersion = "";

    @DBCondition
    @DBJoin(name = "BOPParentID", tableName = "fpc_route", tableAsName = "fpc_route1", Schemas = DBSchemas.PDM,
            MainTableField = "RouteID")
    public int BOPParentID = 0;

    @DBJoin(name = "FactoryID", tableName = "fpc_routeparent", tableAsName = "routeparent1", Schemas = DBSchemas.PDM,JoinIndex = 2,
            ConditionalJoin = "routeparent1.ID=fpc_route1.BOPParentID")
    public int FactoryID = 0;
    @DBJoin(name = "Name", tableName = "fmc_factory", tableAsName = "factory1", Schemas = DBSchemas.Basic, JoinIndex
            = 2,
            ConditionalJoin = "routeparent1.FactoryID=factory1.ID")
    public String FactoryCode = "";
    @DBJoin(name = "Name", tableName = "fmc_factory", tableAsName = "factory1", Schemas = DBSchemas.Basic, JoinIndex
            = 2,
            ConditionalJoin = "routeparent1.FactoryID=factory1.ID")
    public String FactoryName = "";

    @DBJoin(name = "ProductID", tableName = "fpc_routeparent", tableAsName = "routeparent1", Schemas = DBSchemas.PDM,JoinIndex = 2,
            ConditionalJoin = "routeparent1.ID=fpc_route1.BOPParentID")
    public int ProductID = 0;
    @DBJoin(name = "Code", tableName = "fpc_product", tableAsName = "product1", Schemas = DBSchemas.PDM, JoinIndex
            = 3,
            ConditionalJoin = "routeparent1.ProductID=product1.ID")
    public String ProductNo = "";
    @DBJoin(name = "Name", tableName = "fpc_product", tableAsName = "product1", Schemas = DBSchemas.PDM, JoinIndex
            = 3,
            ConditionalJoin = "routeparent1.ProductID=product1.ID")
    public String ProductName = "";

    @DBJoin(name = "ProductTypeID", tableName = "fpc_product", tableAsName = "product1", Schemas = DBSchemas.PDM,
            JoinIndex
                    = 3,
            ConditionalJoin = "routeparent1.ProductID=product1.ID")
    public int ProductTypeID = 0;

    @DBJoin(name = "Code", tableName = "fpc_producttype", tableAsName = "producttype1", Schemas = DBSchemas.PDM,
            JoinIndex = 4,
            ConditionalJoin = "product1.ProductTypeID=producttype1.ID")
    public String ProductTypeCode = "";
    @DBJoin(name = "Name", tableName = "fpc_producttype", tableAsName = "producttype1", Schemas = DBSchemas.PDM,
            JoinIndex = 4,
            ConditionalJoin = "product1.ProductTypeID=producttype1.ID")
    public String ProductTypeName = "";

    @DBJoin(name = "LineID", tableName = "fpc_routeparent", tableAsName = "routeparent1", Schemas = DBSchemas.PDM,JoinIndex = 2,
            ConditionalJoin = "routeparent1.ID=fpc_route1.BOPParentID")
    public int LineID = 0;
    @DBJoin(name = "Name", tableName = "fmc_line", tableAsName = "line1", Schemas = DBSchemas.PDM, JoinIndex = 2,
            ConditionalJoin = "routeparent1.LineID=line1.ID")
    public String LineName = "";
    @DBJoin(name = "Code", tableName = "fmc_line", tableAsName = "line1", Schemas = DBSchemas.PDM, JoinIndex = 2,
            ConditionalJoin = "routeparent1.LineID=line1.ID")
    public String LineCode = "";

    @DBJoin(name = "CustomerID", tableName = "fpc_routeparent", tableAsName = "routeparent1", Schemas = DBSchemas.PDM,JoinIndex = 2,
            ConditionalJoin = "routeparent1.ID=fpc_route1.BOPParentID")
    public int CustomerID = 0;
    @DBJoin(name = "Name", tableName = "crm_customer", tableAsName = "customer1", Schemas = DBSchemas.Basic,
            JoinIndex = 2,
            ConditionalJoin = "routeparent1.CustomerID=customer1.ID")
    public String CustomerName = "";
    @DBJoin(name = "Code", tableName = "crm_customer", tableAsName = "customer1", Schemas = DBSchemas.Basic,
            JoinIndex = 2,
            ConditionalJoin = "routeparent1.CustomerID=customer1.ID")
    public String CustomerCode = "";

    /**
     * 审批备注
     */
    @DBField
    public String RouteRemark = "";

    /**
     * 审批附件（支持多个，逗号分隔）
     */
    @DBField
    public String RouteFileUrl = "";

    @JsonProperty("RouteID")
    public int getRouteID() {
        return RouteID;
    }

    public void setRouteID(int routeID) {
        RouteID = routeID;
    }

    @JsonProperty("RouteVersion")
    public String getRouteVersion() {
        return RouteVersion;
    }

    public void setRouteVersion(String routeVersion) {
        RouteVersion = routeVersion;
    }

    @JsonProperty("BOPParentID")
    public int getBOPParentID() {
        return BOPParentID;
    }

    public void setBOPParentID(int BOPParentID) {
        this.BOPParentID = BOPParentID;
    }

    @JsonProperty("FactoryID")
    public int getFactoryID() {
        return FactoryID;
    }

    public void setFactoryID(int factoryID) {
        FactoryID = factoryID;
    }

    @JsonProperty("FactoryCode")
    public String getFactoryCode() {
        return FactoryCode;
    }

    public void setFactoryCode(String factoryCode) {
        FactoryCode = factoryCode;
    }

    @JsonProperty("FactoryName")
    public String getFactoryName() {
        return FactoryName;
    }

    public void setFactoryName(String factoryName) {
        FactoryName = factoryName;
    }

    @JsonProperty("ProductID")
    public int getProductID() {
        return ProductID;
    }

    public void setProductID(int productID) {
        ProductID = productID;
    }

    @JsonProperty("ProductNo")
    public String getProductNo() {
        return ProductNo;
    }

    public void setProductNo(String productNo) {
        ProductNo = productNo;
    }

    @JsonProperty("ProductName")
    public String getProductName() {
        return ProductName;
    }

    public void setProductName(String productName) {
        ProductName = productName;
    }

    @JsonProperty("ProductTypeID")
    public int getProductTypeID() {
        return ProductTypeID;
    }

    public void setProductTypeID(int productTypeID) {
        ProductTypeID = productTypeID;
    }

    @JsonProperty("ProductTypeCode")
    public String getProductTypeCode() {
        return ProductTypeCode;
    }

    public void setProductTypeCode(String productTypeCode) {
        ProductTypeCode = productTypeCode;
    }

    @JsonProperty("ProductTypeName")
    public String getProductTypeName() {
        return ProductTypeName;
    }

    public void setProductTypeName(String productTypeName) {
        ProductTypeName = productTypeName;
    }

    @JsonProperty("LineID")
    public int getLineID() {
        return LineID;
    }

    public void setLineID(int lineID) {
        LineID = lineID;
    }

    @JsonProperty("LineName")
    public String getLineName() {
        return LineName;
    }

    public void setLineName(String lineName) {
        LineName = lineName;
    }

    @JsonProperty("LineCode")
    public String getLineCode() {
        return LineCode;
    }

    public void setLineCode(String lineCode) {
        LineCode = lineCode;
    }

    @JsonProperty("CustomerID")
    public int getCustomerID() {
        return CustomerID;
    }

    public void setCustomerID(int customerID) {
        CustomerID = customerID;
    }

    @JsonProperty("CustomerName")
    public String getCustomerName() {
        return CustomerName;
    }

    public void setCustomerName(String customerName) {
        CustomerName = customerName;
    }

    @JsonProperty("CustomerCode")
    public String getCustomerCode() {
        return CustomerCode;
    }

    public void setCustomerCode(String customerCode) {
        CustomerCode = customerCode;
    }

    @JsonProperty("RouteRemark")
    public String getRouteRemark() {
        return RouteRemark;
    }

    public void setRouteRemark(String routeRemark) {
        RouteRemark = routeRemark;
    }

    @JsonProperty("RouteFileUrl")
    public String getRouteFileUrl() {
        return RouteFileUrl;
    }

    public void setRouteFileUrl(String routeFileUrl) {
        RouteFileUrl = routeFileUrl;
    }
}
